<div class="am-u-sm-12 widget main-w" >
	<ol class="am-breadcrumb">
		<li><a href="{:url('/admin/index')}">首页</a></li>
		<li><a href="{:url('/admin/car/index')}">业务管理</a></li>
		<li class="am-active">车型管理</li>
	</ol>
	<div class="am-u-sm-12 cl-p">
		<form class="am-form-inline tpl-form-border-form" action="" method="get">
			<div class="am-form-group am-u-sm-3">

				<select name="type" data-am-selected="{btnWidth:'100%', btnSize: 'sm',}">
					<optgroup label="公务">
						<option {$Think.get.type==2?"selected":""} value="2">公务车</option>
						<option {$Think.get.type==3?"selected":""} value="3">公包车</option>
					</optgroup>
					<!--<optgroup label="个人">
						<option {$Think.get.type==4?"selected":""} value="4">约租车</option>
						<option {$Think.get.type==5?"selected":""} value="5">私包车</option>
					</optgroup>-->
				</select>
				<span class="am-form-caret"></span>
			</div>
			<!--<div class="am-form-group am-u-sm-3">

				<select name="car_type" class="car_type" data-am-selected="{btnWidth:'100%', btnSize: 'sm'}">
					{$car_types}
				</select>
				<span class="am-form-caret"></span>
			</div>-->
			
			<!--<div class="am-form-group am-u-sm-6">-->
				
				<div class="am-form-group am-u-sm-9">
				<button type="submit" class="am-btn am-btn-sm am-btn-primary am-radius">查询<i class="am-icon-search"></i></button> 
			</div>

		</form>
	</div>
	<div style="padding: 10px;" class="am-u-sm-12">
		<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
			{if $op == 'search'} {else/}
			{if $Think.get.filter}
			<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
				<a href="{:url('index')}" class="am-btn am-btn-default"> 查看可用车型</a>
				<button type="button" class="am-btn am-btn-default am-fr" style="float: right;">导出数据</button>
				<button type="button" class="am-btn am-btn-default am-fr cache" style="float: right;" data-cache='car_types'>更新缓存</button>
			</div>
			{else/}
			<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
				<a href="{:url('add')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</a>
				<button type="button" class="am-btn am-btn-default delete-multiple" data-method='deleteMultiple'><span class="am-icon-trash-o"></span> 删除</button>
				<a href="{:url('index')}?filter=delete" class="am-btn am-btn-default"> 查看已删除车型</a>
				<button type="button" class="am-btn am-btn-default am-fr" style="float: right;">导出数据</button>
				<button type="button" class="am-btn am-btn-default am-fr cache" style="float: right;" data-cache='car_types'>更新缓存</button>
			</div>
			{/if}
			
			{/if}
			
		</div>
		<table width="100%" class="am-table am-table-compact am-table-bordered am-table-radius am-table-striped am-text-truncate tpl-table-black" id="models">
			<thead>
				<tr>
					{if $op == 'search'}
					<th>操作</th>
					{else/} 
					<th><input type="checkbox" data-checkall='1' class="check-all"/></th>
					{/if}
					<th>车型</th>
					<th>里程费</th>
					<th>起步价</th>
					<th>夜间行驶费</th>
					<th>低速行驶费</th>
					<th>时长费</th>
					<th>远途费</th>
					<th>候客费</th>
					<th>取消费</th>
					<th>停车费</th>
					<th>路桥费</th>
					<th>高速费</th>
					<th>其他费</th>
					<th>状态</th>
					{if $op == 'search'}{else/}
					<th>操作</th>
					{/if}
				</tr>
			</thead>
			<tbody>
				{foreach $list as $key => $item}
				<tr data-id="{$item.car_type_id}">
					{if $op == 'search'}
					<td data-id="{$item.car_type_id}">
						<div class="tpl-table-black-operation">
							<a href="javascript:;" class="choose" data-id="{$item.car_type_id}" data-type="{:config('base.types')[$item.type]}" data-cartype="{:config('base.car_types')[$item.car_type]}">
								<i class="am-icon-pencil"></i> 选中
							</a>
						</div>
					</td>
					{else/}
					<th><input type="checkbox" class="check-list" /></th>
					 {/if}
					<td>{$item.car_type_name}</td>
					<td>{$item.mileage_cost}</td>
					<td>{$item.starting_price}</td>
					<td>{$item.night_driving_cost}</td>
					<td>{$item.low_speed_cost}</td>
					<td>{$item.time_charge}</td>
					<td>{$item.transit_cost}</td>
					<td>{$item.waiting_cost}</td>
					<td>{$item.cancel_cost}</td>
					<td>{$item.parking_cost}</td>
					<td>{$item.road_bridge_cost}</td>
					<td>{$item.high_speed_cost}</td>
					<td>{$item.other_cost}</td>
					<td class="am-text-{$item.state==9?'danger':'success'}">{$item.state==9?'已禁用':'已启用'}</td>
					{if $op == 'search'} {else/}
					<td data-id="{$item.car_type_id}">
						<div class="tpl-table-black-operation">

							{if $item.state == 9}
							<a href="javascript:;" class="startusing" data-method="startusing">
								<i class="am-icon-pencil"></i> 启用
							</a>
							{else/}
							<a href="javascript:;" class="tpl-table-black-operation-del forbidden" data-method="forbidden">
								<i class="am-icon-trash"></i> 禁用
							</a>
							{/if}

							<a href="{:url('edit',['car_type_id'=>$item.car_type_id])}">
								<i class="am-icon-pencil"></i> 编辑
							</a>
							<a href="javascript:;" class="tpl-table-black-operation-del delete-list" data-method="delete">
								<i class="am-icon-pencil"></i> 删除
							</a>

						</div>
					</td>
					{/if}
				</tr>
				{/foreach}
				<!-- more data -->
			</tbody>
		</table>
		<div class="am-u-lg-12 am-cf">

			<div class="am-fr">
				{$pager}
			</div>
		</div>
	</div>

</div>